package classDuoTai01;

public class Student extends Person {
    private String name;
    private int age;
    private int score;

    @Override
    public void show() {
        System.out.printf("我是学生，我的名字是%s，我的年龄是%d\n\n", getName(), getAge());
    }

    public void showMyScore() {
        System.out.printf("我的分数是%d", getScore());
    }

    public Student() {
    }

    public Student(String name, int age, int score) {
        super(name, age);
        this.name = "张三";
        this.age = 18;
        this.score = score;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}
